package com.bajiao.service.order;

import com.bajiao.entity.order.CouponOrder;
import com.bajiao.entity.order.RefundCouponOrder;
import com.bajiao.entity.order.RefundOrder;
import com.bajiao.vo.order.RefundCouponOrderAdmin;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @Description: 优惠券退款单
 * @Author: FanJq
 * @Date:   2024-12-14
 * @Version: V1.0
 */
public interface RefundCouponOrderService extends IService<RefundCouponOrder> {

    /**
     * @Description
     * 创建退款单
     * @date 2024/12/20 14:45
     * @author FanJq
     * @param order
     * @param reason
     * @return {@link Boolean}
    */
    Boolean create(CouponOrder order, String reason);

    /**
     * @Description
     * 根据主订单编号获取
     * @date 2024/12/20 15:08
     * @author FanJq
     * @param orderNo
     * @return {@link RefundCouponOrder}
    */
    RefundCouponOrder getByOrderNo(String orderNo);

    /**
     * @Description
     * 退款单审批
     * @date 2024/12/20 15:08
     * @author FanJq
     * @param refundOrder
     * @param status
     * @return
    */
    void approve(RefundCouponOrder refundOrder, int status);

    /**
     * @Description
     * 管理后台列表
     * @date 2025/1/8 17:22
     * @author FanJq
     * @param orderNo
     * @param keywords
     * @param title
     * @param status
     * @param createTimeBegin
     * @param createTimeEnd
     * @return {@link List< RefundCouponOrderAdmin>}
    */
    List<RefundCouponOrderAdmin> getAdminList(String orderNo, String keywords, String title, Integer status, String createTimeBegin, String createTimeEnd);
}
